package com.aidex.biz.domain;

import com.aidex.common.annotation.Excel;
import com.aidex.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 账户交易信息对象 biz_account_log
 *
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-04-03
 */
@Data
public class AccountLog extends BaseEntity<AccountLog> {
    private static final long serialVersionUID = 1L;


    /**
     * 公司ID
     */
    @Excel(name = "公司名称")
    private String companyName;



    /**
     * 客户信息
     */
    private String customerId;

    /**
     * 客户名称
     */
    @Excel(name = "客户名称")
    private String customerName;

    /**
     * 交易类型 1 充值 2消费
     */
    @Excel(name = "交易类型")
    private String type;

    /**
     * 交易金额
     */
    @Excel(name = "交易金额")
    private BigDecimal amount;

    /**
     * 开始金额
     */
    @Excel(name = "开始金额")
    private BigDecimal startAmount;

    /**
     * 结束金额
     */
    @Excel(name = "结束金额")
    private BigDecimal endAmount;

    /**
     * 创建时间
     */
    @Excel(name = "发生时间",dateFormat="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 状态（0正常 1 停用）
     */
    private String status;


    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setStartAmount(BigDecimal startAmount) {
        this.startAmount = startAmount;
    }

    public BigDecimal getStartAmount() {
        return startAmount;
    }

    public void setEndAmount(BigDecimal endAmount) {
        this.endAmount = endAmount;
    }

    public BigDecimal getEndAmount() {
        return endAmount;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getSort() {
        return sort;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("userId", getUserId()).append("deptId"
                , getDeptId()).append("userName", getUserName()).append("deptName", getDeptName()).append("companyId"
                , getCompanyId()).append("amount", getAmount()).append("customerId", getCustomerId()).append("type",
                getType()).append("startAmount", getStartAmount()).append("endAmount", getEndAmount()).append("sort",
                getSort()).append("status", getStatus()).append("remark", getRemark()).append("id", getId()).append(
                        "createBy", getCreateBy()).append("createDept", getCreateDept()).append("createTime",
                getCreateTime()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append(
                        "updateIp", getUpdateIp()).append("version", getVersion()).append("delFlag", getDelFlag()).toString();
    }
}
